/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.compomics.xtandemparser.xmlreader.operations.parser.handler;

import com.compomics.util.experiment.biology.Protein;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

/**
 *
 * @author Kenneth
 */
public class ProteinHandler extends DefaultHandler {

    boolean isProtein = false;

    @Override
    public void startElement(String uri, String localName, String qName, Attributes attributes)
            throws SAXException {
        if (qName.equalsIgnoreCase("protein")) {
            isProtein = true;
        }
    }

    @Override
    public void characters(char ch[], int start, int length) throws SAXException {
        if (isProtein) {
            //DO SOMETHING
        }
    }

    @Override
    public void endElement(String uri, String localName, String qName)
            throws SAXException {
        isProtein = false;

    }
}
